package com.tuo51.childcare.domain.expertroom;

import com.tuo51.foudation.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 每日观察记录
 */
@Entity
@Table(name = "user_expert_room")
@EqualsAndHashCode(callSuper = true)
@Data
public class ExpertRoom extends Domain {

    @Column(columnDefinition = "varchar(32) COMMENT '专家诊室名称'")
    private String name;

    @Column(columnDefinition = "varchar(32) COMMENT '专家名称'")
    private String expert;

    @Column(columnDefinition = "varchar(256) COMMENT '封面图片'")
    private String description;

    @Column(columnDefinition = "varchar(256) COMMENT '头像'")
    private String avatar;

    @Column(columnDefinition = "varchar(256) COMMENT '标签'")
    private String tags;

    public static ExpertRoom of(String name, String description, String avatar, String tags){
        ExpertRoom ret = new ExpertRoom();

        ret.setName(name);
        ret.setDescription(description);
        ret.setAvatar(avatar);
        ret.setTags(tags);

        return ret;
    }
}
